# coding: utf-8
from pathlib import Path

# 项目根目录
PROJECT_ROOT = Path(__file__).parent.parent.parent
APP_ROOT = PROJECT_ROOT / 'app'
# 资源目录
RESOURCES_DIR = APP_ROOT / 'resource'
CSS_DIR = RESOURCES_DIR / 'css'
IMAGES_DIR = RESOURCES_DIR / 'images'
# 插件目录
PLUGINS_DIR = PROJECT_ROOT / 'plugins'

# app数据目录
APP_DATA_DIR = PROJECT_ROOT / 'AppData'
LOG_DIR = APP_DATA_DIR / 'logs'
DB_DIR = APP_DATA_DIR / 'db'
CONFIG_DIR = APP_DATA_DIR / 'config'
DOWNLOAD_DIR = APP_DATA_DIR / 'download'

YICIYUAN_DB_FILE = DB_DIR / 'yiciyuan.sqlite'

LOG_DIR.mkdir(parents=True, exist_ok=True)
DB_DIR.mkdir(parents=True, exist_ok=True)
CONFIG_DIR.mkdir(parents=True, exist_ok=True)
DOWNLOAD_DIR.mkdir(parents=True, exist_ok=True)
PLUGINS_DIR.mkdir(parents=True, exist_ok=True)

USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0'
RELEASE_LINK = 'https://gitee.com/chiyaun/YiCiYuan/releases'
HELP_LINK = 'https://gitee.com/chiyaun/YiCiYuan/blob/master/README.md'
FEEDBACK_URL = 'https://gitee.com/chiyaun/YiCiYuan/issues/new'
AUTHOR = 'chiyaun'
APP_VERSION = 'V1.0.0'
YEAR = '2025'
APP_NAME = '异次元阅读'
